package com.sa.ibiz.demo.demo.domain;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonProperty.Access;
import lombok.Data;
import org.springframework.beans.BeanUtils;
import org.springframework.cglib.beans.BeanMap;
import org.springframework.cglib.beans.BeanGenerator;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import java.util.Map;
import java.util.HashMap;
import org.springframework.util.StringUtils;
import com.sa.ibiz.demo.ibizutil.security.AuthenticationUser;
import java.util.Date;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import org.springframework.util.DigestUtils;
import org.springframework.util.StringUtils;
import java.util.UUID;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import org.springframework.cglib.beans.BeanCopier;
import com.sa.ibiz.demo.ibizutil.annotation.Dict;
import com.sa.ibiz.demo.ibizutil.domain.EntityBase;
import java.io.Serializable;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import java.math.BigInteger;
import com.sa.ibiz.demo.ibizutil.enums.FillMode;
import com.sa.ibiz.demo.ibizutil.enums.PredefinedType;
import com.sa.ibiz.demo.ibizutil.annotation.PreField;
import com.alibaba.fastjson.annotation.JSONField;


/**
 * 实体[Registry] 数据对象
 */
@TableName(value = "T_SRFREGISTRY",resultMap = "RegistryResultMap")
@JsonIgnoreProperties(ignoreUnknown = true)
@Data
public class Registry extends EntityBase implements Serializable{

    @PreField(fill= FillMode.INSERT,preType = PredefinedType.CREATEDATE)
    private Timestamp createdate;
    @PreField(fill= FillMode.INSERT,preType = PredefinedType.CREATEMAN)
    @Dict(dictName = "WorkflowMob_SysOperatorCodeList")
    private String createman;
    private String memo;
    private String param1;
    private String param2;
    private String param3;
    private String param4;
    private String param5;
    private String param6;
    private String param7;
    private String param8;
    private String param9;
    @TableId(value= "registryid",type=IdType.UUID)//指定主键生成策略
    private String registryid;
    private String registryname;
    @TableField(value= "section")
    private String sector;
    @PreField(fill= FillMode.INSERT_UPDATE,preType = PredefinedType.UPDATEDATE)
    private Timestamp updatedate;
    @PreField(fill= FillMode.INSERT_UPDATE,preType = PredefinedType.UPDATEMAN)
    @Dict(dictName = "WorkflowMob_SysOperatorCodeList")
    private String updateman;
    /**
     *  设置属性值[建立时间]
     *  @param createdate
     */
    public void setCreatedate(Timestamp createdate){
        this.createdate = createdate;
        this.set("createdatedirtyflag",true);
    }
    /**
     *  获取属性值[建立时间]
     */
    public Timestamp getCreatedate(){
        return this.createdate;
    }
    /**
     *  重置属性值[建立时间]
     */
    public void resetCreatedate(){
        this.set("createdatedirtyflag",false);
        this.createdate = null;
    }
    /**
     *  设置属性值[建立人]
     *  @param createman
     */
    public void setCreateman(String createman){
        if(StringUtils.isEmpty(createman))
            createman=null;
        this.createman = createman;
        this.set("createmandirtyflag",true);
    }
    /**
     *  获取属性值[建立人]
     */
    public String getCreateman(){
        return this.createman;
    }
    /**
     *  重置属性值[建立人]
     */
    public void resetCreateman(){
        this.set("createmandirtyflag",false);
        this.createman = null;
    }
    /**
     *  设置属性值[说明]
     *  @param memo
     */
    public void setMemo(String memo){
        if(StringUtils.isEmpty(memo))
            memo=null;
        this.memo = memo;
        this.set("memodirtyflag",true);
    }
    /**
     *  获取属性值[说明]
     */
    public String getMemo(){
        return this.memo;
    }
    /**
     *  重置属性值[说明]
     */
    public void resetMemo(){
        this.set("memodirtyflag",false);
        this.memo = null;
    }
    /**
     *  设置属性值[参数1]
     *  @param param1
     */
    public void setParam1(String param1){
        if(StringUtils.isEmpty(param1))
            param1=null;
        this.param1 = param1;
        this.set("param1dirtyflag",true);
    }
    /**
     *  获取属性值[参数1]
     */
    public String getParam1(){
        return this.param1;
    }
    /**
     *  重置属性值[参数1]
     */
    public void resetParam1(){
        this.set("param1dirtyflag",false);
        this.param1 = null;
    }
    /**
     *  设置属性值[参数2]
     *  @param param2
     */
    public void setParam2(String param2){
        if(StringUtils.isEmpty(param2))
            param2=null;
        this.param2 = param2;
        this.set("param2dirtyflag",true);
    }
    /**
     *  获取属性值[参数2]
     */
    public String getParam2(){
        return this.param2;
    }
    /**
     *  重置属性值[参数2]
     */
    public void resetParam2(){
        this.set("param2dirtyflag",false);
        this.param2 = null;
    }
    /**
     *  设置属性值[参数3(250)]
     *  @param param3
     */
    public void setParam3(String param3){
        if(StringUtils.isEmpty(param3))
            param3=null;
        this.param3 = param3;
        this.set("param3dirtyflag",true);
    }
    /**
     *  获取属性值[参数3(250)]
     */
    public String getParam3(){
        return this.param3;
    }
    /**
     *  重置属性值[参数3(250)]
     */
    public void resetParam3(){
        this.set("param3dirtyflag",false);
        this.param3 = null;
    }
    /**
     *  设置属性值[参数4(250)]
     *  @param param4
     */
    public void setParam4(String param4){
        if(StringUtils.isEmpty(param4))
            param4=null;
        this.param4 = param4;
        this.set("param4dirtyflag",true);
    }
    /**
     *  获取属性值[参数4(250)]
     */
    public String getParam4(){
        return this.param4;
    }
    /**
     *  重置属性值[参数4(250)]
     */
    public void resetParam4(){
        this.set("param4dirtyflag",false);
        this.param4 = null;
    }
    /**
     *  设置属性值[参数5(500)]
     *  @param param5
     */
    public void setParam5(String param5){
        if(StringUtils.isEmpty(param5))
            param5=null;
        this.param5 = param5;
        this.set("param5dirtyflag",true);
    }
    /**
     *  获取属性值[参数5(500)]
     */
    public String getParam5(){
        return this.param5;
    }
    /**
     *  重置属性值[参数5(500)]
     */
    public void resetParam5(){
        this.set("param5dirtyflag",false);
        this.param5 = null;
    }
    /**
     *  设置属性值[参数6(500)]
     *  @param param6
     */
    public void setParam6(String param6){
        if(StringUtils.isEmpty(param6))
            param6=null;
        this.param6 = param6;
        this.set("param6dirtyflag",true);
    }
    /**
     *  获取属性值[参数6(500)]
     */
    public String getParam6(){
        return this.param6;
    }
    /**
     *  重置属性值[参数6(500)]
     */
    public void resetParam6(){
        this.set("param6dirtyflag",false);
        this.param6 = null;
    }
    /**
     *  设置属性值[参数7(500)]
     *  @param param7
     */
    public void setParam7(String param7){
        if(StringUtils.isEmpty(param7))
            param7=null;
        this.param7 = param7;
        this.set("param7dirtyflag",true);
    }
    /**
     *  获取属性值[参数7(500)]
     */
    public String getParam7(){
        return this.param7;
    }
    /**
     *  重置属性值[参数7(500)]
     */
    public void resetParam7(){
        this.set("param7dirtyflag",false);
        this.param7 = null;
    }
    /**
     *  设置属性值[参数8(500)]
     *  @param param8
     */
    public void setParam8(String param8){
        if(StringUtils.isEmpty(param8))
            param8=null;
        this.param8 = param8;
        this.set("param8dirtyflag",true);
    }
    /**
     *  获取属性值[参数8(500)]
     */
    public String getParam8(){
        return this.param8;
    }
    /**
     *  重置属性值[参数8(500)]
     */
    public void resetParam8(){
        this.set("param8dirtyflag",false);
        this.param8 = null;
    }
    /**
     *  设置属性值[参数9]
     *  @param param9
     */
    public void setParam9(String param9){
        if(StringUtils.isEmpty(param9))
            param9=null;
        this.param9 = param9;
        this.set("param9dirtyflag",true);
    }
    /**
     *  获取属性值[参数9]
     */
    public String getParam9(){
        return this.param9;
    }
    /**
     *  重置属性值[参数9]
     */
    public void resetParam9(){
        this.set("param9dirtyflag",false);
        this.param9 = null;
    }
    /**
     *  设置属性值[注册表标识]
     *  @param registryid
     */
    public void setRegistryid(String registryid){
        if(StringUtils.isEmpty(registryid))
            registryid=null;
        this.registryid = registryid;
        this.set("registryiddirtyflag",true);
    }
    /**
     *  获取属性值[注册表标识]
     */
    public String getRegistryid(){
        return this.registryid;
    }
    /**
     *  重置属性值[注册表标识]
     */
    public void resetRegistryid(){
        this.set("registryiddirtyflag",false);
        this.registryid = null;
    }
    /**
     *  设置属性值[系统目录]
     *  @param registryname
     */
    public void setRegistryname(String registryname){
        if(StringUtils.isEmpty(registryname))
            registryname=null;
        this.registryname = registryname;
        this.set("registrynamedirtyflag",true);
    }
    /**
     *  获取属性值[系统目录]
     */
    public String getRegistryname(){
        return this.registryname;
    }
    /**
     *  重置属性值[系统目录]
     */
    public void resetRegistryname(){
        this.set("registrynamedirtyflag",false);
        this.registryname = null;
    }
    /**
     *  设置属性值[目录]
     *  @param sector
     */
    public void setSector(String sector){
        if(StringUtils.isEmpty(sector))
            sector=null;
        this.sector = sector;
        this.set("sectordirtyflag",true);
    }
     /**
     *    sector :section
     *   当属性名称与代码名称不一致时，
     *   多发一套get属性名称方法给gridvo用
     */
    public String getSection(){
        return  sector;
    }
     /**
     *    sector :section
     *   关闭mp驼峰转换，当属性名称与代码名称不一致时，多发一套set用于值注入
     */
    public void setSection(String section){
        this.sector=section;
    }
    /**
     *  获取属性值[目录]
     */
    public String getSector(){
        return this.sector;
    }
    /**
     *  重置属性值[目录]
     */
    public void resetSector(){
        this.set("sectordirtyflag",false);
        this.sector = null;
    }
    /**
     *  设置属性值[更新时间]
     *  @param updatedate
     */
    public void setUpdatedate(Timestamp updatedate){
        this.updatedate = updatedate;
        this.set("updatedatedirtyflag",true);
    }
    /**
     *  获取属性值[更新时间]
     */
    public Timestamp getUpdatedate(){
        return this.updatedate;
    }
    /**
     *  重置属性值[更新时间]
     */
    public void resetUpdatedate(){
        this.set("updatedatedirtyflag",false);
        this.updatedate = null;
    }
    /**
     *  设置属性值[更新人]
     *  @param updateman
     */
    public void setUpdateman(String updateman){
        if(StringUtils.isEmpty(updateman))
            updateman=null;
        this.updateman = updateman;
        this.set("updatemandirtyflag",true);
    }
    /**
     *  获取属性值[更新人]
     */
    public String getUpdateman(){
        return this.updateman;
    }
    /**
     *  重置属性值[更新人]
     */
    public void resetUpdateman(){
        this.set("updatemandirtyflag",false);
        this.updateman = null;
    }
    /**
     * 重置当前数据对象属性值
     */
    public  void reset(){
        resetCreatedate();
        resetCreateman();
        resetMemo();
        resetParam1();
        resetParam2();
        resetParam3();
        resetParam4();
        resetParam5();
        resetParam6();
        resetParam7();
        resetParam8();
        resetParam9();
        resetRegistryid();
        resetRegistryname();
        resetSector();
        resetUpdatedate();
        resetUpdateman();
    }
     /**
     * 获取数据主键（普通主键与联合主键）
     * @return
     */
    @JsonIgnore
    public Serializable getDefaultPrimaryKey()
    {
    	//联合主键
        String primaryKey ="";
        primaryKey+=this.getRegistryname();
        primaryKey+="||";
        primaryKey+=this.getSector();
        return  DigestUtils.md5DigestAsHex(primaryKey.getBytes());
    }
     /**
     * 复制当前对象数据到目标对象(粘贴重置)
     *
     * @throws Exception
     */
    public Registry copyTo(Registry targetEntity)
	{
		BeanCopier copier=BeanCopier.create(Registry.class, Registry.class, false);
		copier.copy(this, targetEntity, null);
        targetEntity.resetRegistryid();
		return targetEntity;
	}
}